package com.example.test.advice.第一章_java开发中常用的方法和准则.建议5_别让Null值和空值威胁到变长方法;

public class Client {

    public void methodA(String str,Integer...is){

    }

    public void methodA(String str,String...strs){

    }

    public static void main(String[] args) {
        Client client = new Client();
        client.methodA("China",0);
        client.methodA("China","People");
        //client.methodA("China");//违反了懒人原则
        //client.methodA("China",null);//违反了懒人原则及隐藏了实参类型
        String s = null;
        client.methodA("China",s);//此时便不报错，因为指明了实参类型
    }
}
